﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using FX.CC.Andon.Entity.ReportManage;
using FX.CC.Andon.Service.ReportManage;
using FX.CC.Andon.Utility.Common;
using FX.CC.Andon.Utility.Json;

namespace FX.CC.Andon.Business.ReportManage
{
    public class AchievingRateBusiness
    {
        private readonly AchievingRateService _dal=new AchievingRateService();

        public string GetAchievingRateReptList(AchievingRateQcEntity qcmodel)
        {
            var total = _dal.GetAchievingRateReptCount(qcmodel);
            var list = _dal.GetAchievingRateReptList(qcmodel);
            return JsonHelper.Encode(total, list);
        }

        public DataTable ExportAchievingRateRept(AchievingRateQcEntity qcmodel)
        {
            var list = _dal.ExportAchievingRateRept(qcmodel);
            return Collection.ListToDataTable(list);
        }
    }
}
